Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js: Don't trigger beforerender or rendered for discarded content #5057

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nilmerg
Copy link
Member

@nilmerg nilmerg commented Jul 7, 2023

A listener for rendered should not need to check if the content really changed. Though, if such a listener is not triggered anymore, beforerender listeners also must not be triggered, as they might assume that the content is really being updated and their accompanied rendered listener is triggered. (e.g. input-enrichment.js)

This might be breaking change and any Behavior.renderHook implementation needs to be checked against it. Potentially also in third party modules. As if such an implementation updates the container on its own, beforerender listeners only have access to the updated container after this change, while they had access to the original beforehand.

rendered listeners should not be that much affected, as for them the change results in the same behavior as if no update has ever been scheduled for the container.

fixes #5056

A listener for `rendered` should not need to check if the content
really changed. Though, if such a listener is not triggered anymore,
`beforerender` listeners also must not be triggered, as they might
assume that the content is really being updated and their accompanied
`rendered` listener is triggered. (e.g. input-enrichment.js)

This might be breaking change and any `Behavior.renderHook` implementation
needs to be checked against it. Potentially also in third party modules.
As if such an implementation updates the container on its own,
`beforerender` listeners only have access to the updated container after
this change, while they had access to the original beforehand.

`rendered` listeners should not be that much affected, as for them the
change results in the same behavior as if no update has ever been
scheduled for the container.

fixes #5056
@nilmerg nilmerg added bug Something isn't working area/javascript Affects the javascript framework labels Jul 7, 2023
@nilmerg nilmerg self-assigned this Jul 7, 2023
@cla-bot cla-bot bot added the cla/signed label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/javascript Affects the javascript framework bug Something isn't working cla/signed
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

multiple "1 Item(s) selected"
1 participant